package lab01;

import java.util.Scanner;

/**
 * Created by 阿阿阿阿豪丶 on 2017/9/30.
 */
public class Test08 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个1~100的数");
        int number = (int) (Math.random() * 100) + 1;
        int count = 0;
        while (true) {
            count++;
            int x = sc.nextInt();
            if (x < number) {
                System.out.println("太小啦！");
            } else if (x > number) {
                System.out.println("太大啦！");
            } else {
                System.out.println("你用了" + count + "次猜中了");
                if (count > 7) {
                    System.out.println("你好菜！~( ‘…’~)");
                } else {
                    System.out.println("你好6！（~^3^)~");
                }
                break;
            }
        }
    }
}
